package com.lty.test;

/**
 *
 * @author lty
 */
public class Main {
    public static void main(String[] args) {
        AbstractProcessor A=new AProcessor();
        AbstractProcessor B=new BProcessor();
        AbstractProcessor C=new CProcessor();

        String text="test";
        // 设置责任链顺序
        A.setNextProcessor(B);
        B.setNextProcessor(C);

        A.process(text);
    }
}
